var button = document.getElementById ('button');
button.addEventListener ('click', function () {
  var name = document.getElementById ('name').value;
  var pwd = document.getElementById ('pwd').value;
  var userInfor = document.getElementById ('userInfor');
  console.log ('name:', name, 'pwd:', pwd);
  ajax.post (
    'demo1.php?rand=' + Math.random (),
    {
      name: name,
      pwd: pwd,
    },
    function () {
      var xhr = ajax.x ();
      //alert("aa");
      //alert(xhr.responseText);请求响应了，却没弹出 响应信息
      userInfor.append (xhr.responseText);
    }
  );
});
